﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;

using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using Cn.Edwon.Web.Support;
using Cn.Edwon.Spring;
using Cn.Cellula.Biz.Port;
using System.Reflection;

namespace Cn.Cellula.Website.Admin.Wuc {
    public partial class WUC_Menu : WucSupport {
        protected void Page_Load(object sender, EventArgs e) {
            LoadMenuCode();
        }

        private void LoadMenuCode() {
            IUserBiz biz = BizFactory.Get<IUserBiz>();
            try {
                String xmlstr = biz.LoadFunctions2JskitMenuXml(this.Actor, "");
                xmlstr = xmlstr.Replace("\"", "\\\"");
                this.lab_JskitMenuXml.Text = "<script type=\"text/javascript\">var JskitMenuXml = \"" + xmlstr + "\";</script>";
            } catch (Exception ex) {
                log.Error("获取菜单数据时错误:" + ex.Message);
                this.lab_JskitMenuXml.Text = "<script type=\"text/javascript\">var JskitMenuXml = \"\";</script>";
            }
        }
    }
}